<?php
/**
 * Created by 绵阳人维网络科技有限公司.
 * User: 罗东华
 * Date: 2016/6/30
 * Time: 9:32
 */
//获取导航菜单
function getmenu($parentit=''){
    $category=M('category');
    if($parentit){
        $where['parentid']=$parentit;
    }else{
        $where['ismenu']=1;
    }

    $where['status']=0;
    return $category->where($where)->order('listorder DESC')->cache(true)->select();

}